package org.krishna.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "course_details")
public class Course implements Serializable{
	
	/** The Constant serialVersionUID. */
	@Transient
	private static final long serialVersionUID = -7660824605183781430L;
	
	@Id
	@GeneratedValue
	@Column(name = "course_id")
	private int courseId;
	
	@Column(name = "course_name")
	private String courseName;
	
	@ManyToOne
	@JoinColumn(name = "teacher_id")
	private Login teacher;
	
	@OneToMany(mappedBy = "course")
	private Set<Enrol> enrolDetails;

	public Set<Enrol> getEnrolDetails() {
		return enrolDetails;
	}

	public void setEnrolDetails(Set<Enrol> enrolDetails) {
		this.enrolDetails = enrolDetails;
	}
	
	@OneToMany(mappedBy = "course")
	private Set<Marks> marksDetails;

	public Set<Marks> getMarksDetails() {
		return marksDetails;
	}

	public void setMarksDetails(Set<Marks> marksDetails) {
		this.marksDetails = marksDetails;
	}

	public int getCourseId() {
		return courseId;
	}

	public void setCourseId(int courseId) {
		this.courseId = courseId;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public Login getTeacher() {
		return teacher;
	}

	public void setTeacher(Login teacher) {
		this.teacher = teacher;
	}

	
	
}
